-- GENERATED SPELL FOR [Kolkar Ambusher] --


function spell0_12977(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_12977', 591, 1)
end

function spell1_12977(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_12977', 547, 1)
end

function spell2_12977(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(25710,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12977', 529, 1)
end

function Sorts_12977(pUnit, Event)
local choix_sorts_12977 = math.random(0, 2)
if choix_sorts_12977 == 0 then
pUnit:RegisterEvent('spell0_12977', 1, 1)
end
if choix_sorts_12977 == 1 then
pUnit:RegisterEvent('spell1_12977', 1, 1)
end
if choix_sorts_12977 == 2 then
pUnit:RegisterEvent('spell2_12977', 1, 1)
end
end

function mob12977_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12977', math.random(1500, 3000), 1)
end

function mob12977_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12977_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12977_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12977, 1, 'mob12977_Action')
RegisterUnitEvent(12977, 2, 'mob12977_Leave')
RegisterUnitEvent(12977, 3, 'mob12977_Kill')
RegisterUnitEvent(12977, 4, 'mob12977_Die')
